package ioUser

import (
	"gitee.com/saxon134/workflow/enum"
	"time"
)

type Basic struct {
	Id   int64  `json:"id" form:"id"`
	Name string `json:"name" form:"name"`
}

type LoginRequest struct {
	Account  string `json:"account" form:"account"`
	Password string `json:"password" form:"password"`
}

type LoginResponse struct {
	Id       int64      `json:"id"`
	CreateAt *time.Time `json:"createAt"`
	Name     string     `json:"name"`
	Account  string     `json:"account"`
	Roles    []int64    `json:"roles"`
	Token    string     `json:"token"`
}

type AccountSaveRequest struct {
	Account
	Password string `form:"password"`
	Roles    string `form:"roles"`
}

type AccountModifyRequest struct {
	Id       int64  `json:"id"`
	Password string `json:"password"`
	Name     string `json:"name"`
}

type Account struct {
	Id       int64       `json:"id"`
	CreateAt *time.Time  `json:"createAt"`
	Role     enum.Role   `json:"role"`
	Name     string      `json:"name"`
	Account  string      `json:"account"`
	Status   enum.Status `json:"status"`
}

type ListRequest struct {
	Username string      `json:"username"`
	NoRole   int         `json:"noRole"` //排除的角色
	Status   enum.Status `json:"status"`
}
